home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Magazine / PC2Amiga / Samba / docs / textdocs / File-Cacheing.txt < prev    next >
Text File  |  2000-04-25  |  3KB  |  72 lines

  1. !==
  2. !== File-Cacheing.txt for Samba release 2.0.7 26 Apr 2000
  3. !==
  4. Some people report problems with "cacheing" of data. Generally the bug report 
  5. goes like this:
  6.  
  7. - create a file on a unix box
  8. - view the file on a PC via Samba
  9. - change the file on the unix box
  10. - look at the file again on the PC via Samba and the changes are not visible
  11.  
  12. The first thing to realise is that this is the expected behaviour! The SMB protocol
  13. uses a thing called "opportunistic locking". This allows the client to "safely"
  14. do client side cacheing of file data. The problem is that this cacheing is only
  15. safe if all programs access the files via SMB. As soon as you access the data
  16. via a non-SMB client then you will get data inconsistencies.
  17.  
  18. There are two solutions. Firstly, Samba has added a kernel level
  19. interface that allows access from a UNIX client either via NFS
  20. or a local process to notify Samba to 'break' the oplock, and
  21. thus force the correct data to be seen. Currently the only UNIX
  22. operating system that supports this interface is SGI IRIX 6.5.3f
  23. and above. However, this interface is currently being discussed
  24. for inclusion in both Linux and FreeBSD, and some of the other
  25. UNIX vendors are also interested in supporting it.
  26.  
  27. The second solution is to disable oplocks in smb.conf for those shares
  28. that need to be accessed simutaneously from unix and windows. See the
  29. "oplocks" and "veto oplock files" options in smb.conf(5). Unfortunately
  30. this will cause a speed penalty but with the non-kernel method this
  31. cannot be avoided if up to date data is required for files accessed
  32. from both Windows and UNIX.
  33.  
  34. Two more data points :
  35.  
  36. Samba-1.9.18 and later series supports oplocks.
  37. Samba-1.9.17 series does NOT.
  38.  
  39. In addition, the following registry entries under MS Windows NT4 will
  40. turn off oplocks on a client. WARNING !!!! This is *NOT* recommended
  41. and will turn off oplocks for *all* servers aceessed from this client.
  42.  
  43. ===================================================================================
  44.  
  45. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Paramete
  46. rs]
  47. "BufFilesDenyWrite"=dword:00000000
  48. "BufNamedPipes"=dword:00000000
  49. "UseOpportunisticLocking"=dword:00000000
  50. "DormantFileLimit"=dword:00000000
  51.  
  52. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Paramete
  53. rs\Linkage]
  54. "UtilizeNtCaching"=dword:00000000
  55.  
  56. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Filesystem]
  57. "Win95TruncateExtensions"=dword:00000000
  58.  
  59. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters]
  60. "EnableOpLockForceClose"=dword:00000001
  61. "EnableOpLocks"=dword:00000000
  62.  
  63.  
  64. ==================================================================================
  65.  
  66. The following registry entry does the same under Windows 9X also:
  67.  
  68.  
  69. [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\VREDIR]
  70. "DiscardCacheOnOpen"=string:00000001
  71.  
  72.